const seq = require('sequelize')
const time = require('../time')

module.exports = {
  NAME: 'sys_dept',
  TABLE: {
    dept_id: {
      type: seq.INTEGER(11),
      allowNull: false,
      primaryKey: true,
      comment: '部门id',
      autoIncrement: true,
      field: 'dept_id'
    },
    dept_name: {
      type: seq.STRING(50),
      comment: '部门名称',
      field: 'dept_name'
    },
    sort: {
      type: seq.INTEGER(11),
      comment: '排序',
      field: 'sort'
    },
    parent_id: {
      type: seq.INTEGER(11),
      comment: '父级部门id',
      field: 'parent_id'
    },
    del_flag: {
      type: seq.CHAR(1),
      comment: '是否删除  -1：已删除  0：正常',
      defaultValue: '0',
      field: 'del_flag'
    },
    ...time.create_date,
    ...time.upadte_date
  }
}
